//
//  personalViewController.m
//  ILiangCang
//
//  Created by ZX on 16-4-11.
//  Copyright (c) 2016年 CRQ. All rights reserved.
//

#import "personalViewController.h"
#import "logRegisterViewController.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
@interface personalViewController ()

@property (nonatomic,assign)BOOL isLogin;
@end

@implementation personalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    self.navigationController.navigationBarHidden = YES;
    
    
    NSUserDefaults * userDefaults = [NSUserDefaults standardUserDefaults];
    if (![userDefaults boolForKey:@"login"])
    {
        logRegisterViewController * vc = [[logRegisterViewController alloc]init];
        [self presentViewController:vc animated:YES completion:nil];
    }
    
    
    
    
    self.view.backgroundColor = [UIColor purpleColor];
    UIView * navView = [[UIView alloc]init];
    navView.frame = CGRectMake(0, 0, WIDTH, 64);
    [self.view addSubview:navView];
    UIImageView * navBG = [[UIImageView alloc]init];
    navBG.frame = CGRectMake(0, 0, WIDTH, 64);
    navBG.image = [UIImage imageNamed:@"nav_bar"];
    [navView addSubview:navBG];
    UIButton * menuBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    menuBtn.frame = CGRectMake(10, 24, 34, 34);
    [menuBtn setBackgroundImage:[UIImage imageNamed:@"nav_op"] forState:UIControlStateNormal];
    menuBtn.tag = 1;
    [menuBtn addTarget:self action:@selector(menuBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [navView addSubview:menuBtn];
    
    
    
    
    
    
    
    
    
    
    
    
    
}

-(void)menuBtnClick:(UIButton *)sender
{
    sender.tag++;
    if (sender.tag % 2 == 0)
    {
        [self.drawer open];
    }else
    {
        [self.drawer close];
    }
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
